In electronic document processing a distinction is made between capabilities granted to authors of documents and to users of documents. Authors use authoring software to create documents and distribute electronic files that represent the documents to users, via the Internet for example. Users use viewer software to view the documents on their own computer, with no, or very limited editing capability. The Adobe Acrobat Reader (R) is an example of a computer program that can be used to view and print electronic documents.
Advanced document viewer software like Adobe Acrobat Reader (R) supports interactive “forms”. An electronic form is an electronic document that has been created by an author, in which the author has defined one or more “fields” that can be filled in by users of copies of the document. When the viewer software runs on the computer of the user, and the user loads an electronic form, the software permits the user to enter data at specific positions in the electronic form, as defined by the fields. When the copy of the document is subsequently printed the data is printed at the specific positions in the document, so that the printed document becomes partly specific to the user.
Some electronic documents include barcodes to facilitate processing of the printed version of the documents. Barcodes are of course well known per se and include not only extremely familiar barcodes made up of vertical bars in ink against an uninked background, but also other dedicated standardized machine readable patterns of geometrical elements such as configurations of inked polygons (in particular rectangles or hexagons) against a background. In this sense the term barcode, as also used herein, is not limited to codes made up of bars, but extend to any printed geometrical pattern for standardized machine encoding and decoding. In particular, barcodes ensure that the process of data capture from the printed documents will later take considerably less work.
It is not difficult to add a static barcode at the time of authoring. Any static barcode can be added by including picture data that defines a bit map of the barcode. It would be desirable that barcodes could also be printed dependent on data that has been entered by the user into the fields in a form, preferably in addition to rendering in normal human readable characters. In this case it is desirable to generate the barcode at the document processor, once the form is filled.
In one implementation, this can be realized by a making use of an installed barcode generation library at the user computer and including function calls to this library in the electronic document to generate barcodes. However, this makes the distribution of electronic documents dependent on installed programs. The author of the document has no control over these programs. Electronic documents may thus have different effects on different user computers, or may not even work at all when no library is installed.
Another implementation uses a barcode “font” that defines barcode symbols assigned to respective characters. The author of a form ensures printing of a barcode by specifying that data entered in a field should be printed using the barcode font instead of conventional digits.
When the necessary font is not installed on a computer, problems arise when the document has to be printed. More generally, the use of commands to print a string of characters with a specific font is an inflexible solution, which limits the kind of barcodes that can be printed. Other than by supplying different characters the generated barcode cannot be adapted to make the barcode document or user specific.
These problems can partly be solved by embedding a barcode font definition in the electronic document. The font definition in the document defines a closed collection of geometrical shapes, one for each possible character, that should be printed to render respective characters. However, this solution still does not overcome all problems associated with fonts. Some two dimensional barcodes cannot even be printed at all as characters printed with a font. For example, some two dimensional barcodes define a two dimensional matrix of positions where spatial blocks must be printed to represent bits of codewords that are derived by compacting characters. The bit positions for a codeword form a respective spatial block in the printed document, but the blocks need not all be arranged in rows or columns, and may even not be rectangular. Such an arrangement of blocks cannot be printed by printing the blocks font symbols selected by successive characters. Moreover, printing with a font does not support computations that are useful for character encoding, such as compaction and generation of error correction symbols, Also, the same geometrical shape must always be used for the same character.
An additional problem is that unscrupulous persons might attempt to tamper with the printed document, so that false data will be captured when the barcode is captured, by physically replacing a barcode of a document with a different barcode that is not consistent with the information printed with human readable characters. Such a false barcode can easily be generated when a commonly available standard barcode font is used to generate the barcodes in a document.
Among others, it is an object of the invention to enable printing of electronic forms with barcodes that encode user defined data, in which the barcodes can be generated more flexibly.
Among others, it is an object of the invention to enable generation of dependent on user defined data without having to rely on pre-installed modules in a user computer such as fonts or libraries.
Among others, it is a further object of the invention to take measures against tampering with bar codes in a printed version of an electronic form.
Among others, it is a further object of the invention to make it possible to include any kind of two dimensional barcode that encodes user entered data in a printed version of an electronic form.
Among others, it is a further object of the invention to make it possible to include barcodes, without needing to embed a font definition in the electronic form.
The invention provides for a method of obtaining printed instances of a document. According to the invention the document contains an embedded program, for controlling printing of geometrical elements of a bar code in an instance of the document, dependent on user data entered in an input field in the document. The embedded program is linked to the user data input field in the sense that, when the document is printed the program will be called with the string from the field as argument; thus there is preferably a freedom to choose the program that is linked to a field. Different programs may be linked to different fields, or the same program could be linked to different fields.
Each program uses codewords, which are numerical values that each represent a respective character that has been entered in the field, or compactions of the characters, or error correction codewords derived from the characters etc The barcode in the printed document is made up of a number of different areas, each containing a configuration of geometrical elements, each configuration representing a respective codeword, in the sense that after scanning the barcode each of the codewords can be decoded from a respective configuration of all printed geometrical elements and the background in a respective one of the areas. The program generates commands to print individual geometrical elements of configurations of elements that, as a configuration, represent a codeword in the respective area of the barcode. The geometrical elements are for example polygons (e.g. rectangles or hexagons) for which printing commands exist for on the printer, so that the printer does not need to support specific commands for printing barcodes, and the generated commands each command printing one such general purpose geometrical element.
Preferably, the embedded program has the flexibility to make the configurations dependent on the specific area in the printed document in which each codeword is represented. Each area corresponds to a respective codeword and contains a configuration of all geometrical elements and the background that represent the codeword, no geometrical elements that represent other codewords are contained in the area. The program may select to generate commands to draw any one of a number of different configurations to represent a codeword, dependent on where the codeword represented in the printed document.
Because the program is embedded in the electronic form (i.e. the program travels with the document and does not need to be installed separately) a general purpose viewer may be used, which is not specifically prepared to generate barcodes or even two-dimensional barcodes. An Adobe Acrobat (R) viewer may be used, for example.
Any kind of two dimensional barcode may be drawn in this way, including for example barcodes that use a map of differently shaped areas within the barcode, wherein each area represents a respective codeword and contains a configuration of all geometrical elements and the background that represent the codeword with the particular shape of the area. Similarly an area in which a codeword is represented may contain disjoint parts that are separated by areas in which other codewords are represented.
The embedded program controls all the properties of the printed geometrical elements that, together, form the printed barcode. Because an embedded program is used, the configurations of geometric elements of the barcode can be flexibly adapted in ways that will not affect the result of decoding of the barcode, in so far as the barcode is decoded according to the standard that defines the barcode. The adaptations can be used to communicate additional visual information by means of the barcode, so that the additional visual information is preferably prima facie recognizable for humans (i.e. without having to decode the barcode, and if desired irrespective of the codewords).
The additional information may include information that makes it difficult to replace the barcode unnoticeably in a printed document. The additional information may also include information that represents a company logo, for example. Preferably, the embedded program is arranged to make adaptations to the barcode so that different geometrical elements within the same area (which contains all geometrical elements and their background that represent a codeword and no geometrical elements or background that represent other codewords from the barcode) can be adapted independently.
The adaptations may involve adding geometrical elements for use in the printed the barcode, so that the added elements are recognizable by themselves when printed, for example because they are in a different color from other elements of the barcode, or so that the added elements are recognizable in combination with elements that are added to the printed document outside the barcode, for example as the extension of lines added to the printed document. The adaptations may also involve changing the color or grey level density of selected geometrical elements of the barcodes. The adaptations may also involve removing geometrical elements of the barcodes altogether, if the removal can be corrected by an error correction mechanism defined for the barcode. The adaptations may also involve to modify certain geometrical elements from a barcode so that a geometrical element of a first barcode is formed by a second barcode (encoding another string of characters), preferably of a different type, without affecting later decoding of any of the first or second barcode, creating the concept of “sub barcode in barcode”.
The invention also provides for an electronic form that contains an embedded program of machine executable instructions to control drawing of elements of a barcode in a printed version of the electronic form, dependent on data entered by a user into fields of the electronic form. With such a form the user is enabled to fill in the data to be represented by the barcode interactively using a document viewer, without being permitted to edit the document in its entirety. Such electronic forms can be distributed as messages via the Internet or on data carriers such as magnetic or optical disks.
The invention also provides for a method for authoring an electronic form by editing an embedded program for generating barcodes, so that effectively the barcode is authored to make it user defined data or even document specific, within the restrictions imposed by decodability.